package com.shenfa.dao;

import java.sql.SQLException;
import java.util.*;

import org.springframework.beans.factory.annotation.Autowired;

import com.ibatis.sqlmap.client.SqlMapClient;
import com.shenfa.bean.Menu;
/**
 * 
 * @author laixiaodong 
 * @date  2011-8-20
 */
public class MenuDao {
	@Autowired
	private SqlMapClient sqlMapClient;
	/**
	 * 查询指定功能菜单
	 * @param paramList
	 * @return
	 */
	public List<Menu> getMenuByList(List<String> paramList){
		List<Menu> list=new ArrayList<Menu>();
		try {
			list=sqlMapClient.queryForList("menu.getMenuByList",paramList);
		} catch (SQLException e) {
			e.printStackTrace();
		}finally{
			return list;
		}
	}
	
	/**
	 * 查询所有功能菜单
	 * @param paramList
	 * @return
	 */
	public List<Menu> getAllMenu(){
		List list=new ArrayList();
		try {
			list=sqlMapClient.queryForList("menu.getAllMenuList");
		} catch (SQLException e) {
			e.printStackTrace();
		}finally{
			return list;
		}
	}
}
